import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
import { IonicStorageModule } from '@ionic/storage';
//引入子模块
import { WorkModule } from '../pages/work/work.module'
import { CircleModule } from '../pages/circle/circle.module'
import { NewsModule } from '../pages/news/news.module'

import { Contact } from '../pages/contact/contact';
import { Mine } from '../pages/person/mine/mine';
import { ChangePwd } from '../pages/person/changePwd/changePwd';
import { Tabs } from '../pages/tabs/tabs';
import { Login } from '../pages/lrf/login/login';
import { Register } from '../pages/lrf/register/register';
import { FindPwd } from '../pages/lrf/findPwd/findPwd';
import { HttpModule } from '@angular/http';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import {dialogUtil} from "../service/dialogUtil";
import { SQLiteService } from '../service/SQLiteService';
import { httpService } from '../service/httpService';//接口

import { SQLite } from '@ionic-native/sqlite';

@NgModule({
  declarations: [
    MyApp,
    Contact,//联系人
    Mine,//我的
    Tabs,
    Login,//登录
    Register,//注册
    FindPwd,//找回密码
    ChangePwd,
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp,{
      tabsHideOnSubPages: 'true'         //隐藏全部子页面tabs
    }),
    IonicStorageModule.forRoot(), //数据存储
    CircleModule,//工作圈模块
    WorkModule,//工作模块
    NewsModule,//消息模块
    HttpModule
  ],

  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    Contact,//联系人
    Mine,//我的
    Tabs,
    Login,//登录
    Register,//注册
    FindPwd,//找回密码
    ChangePwd,
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    dialogUtil,
    SQLiteService,
    SQLite,
    httpService,
  ]
})
export class AppModule {}
